/*
 * This file is part of the SDWebImage package.
 * (c) Olivier Poitrey <rs@dailymotion.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

#import "SDWebImageCompat.h"
#import "SDWebImageManagerDelegate.h"
#import "ASIHTTPRequestDelegate.h"



#define DOCUMENT_DIR [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
#define CACHE_IMAGE_DIR02 [NSString stringWithFormat:@"%@/Cache/Detail/",DOCUMENT_DIR]
#define CACHE_IMAGE_DIR [NSString stringWithFormat:@"%@/Cache/",DOCUMENT_DIR]
@interface UIImageView (WebCache) <SDWebImageManagerDelegate, ASIHTTPRequestDelegate>



- (void)setImageWithURL:(NSURL *)url;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder subDirectory:(NSString*)subDirectory;
- (void)cancelCurrentImageLoad;
-(void)setTimeout:(int)time;
-(void) setTimeout:(int)time withImage:(UIImage *)image;
-(void)setTimeoutAndCancelDuration:(int)time;
- (void)setImageWithURL:(NSURL *)url defaultImage:(UIImage *)defaultImage timeOut:(int)timeOut;
- (void)setImageWithURL:(NSURL *)url defaultImage:(UIImage *)defaultImage timeOut:(int)timeOut subDirectory:(NSString*)subDirectory;
- (void)setImageWithURL2:(NSURL *)url defaultImage:(UIImage *)defaultImage timeOut:(int)timeOut subDirectory:(NSString*)subDirectory index:(NSInteger)index;
- (void)setImageWithURLInScroll:(NSURL *)url defaultImage:(UIImage *)defaultImage timeOut:(int)timeOut subDirectory:(NSString*)subDirectory;
- (void)setImageWithURL02:(NSURL *)url defaultImage:(UIImage *)defaultImage timeOut:(int)timeOut index:(NSInteger)index;
-(BOOL)checkImageCacheWithUrl:(NSURL*)url andDir:(NSString*)CacheDir;
#pragma mark file process
NSString* fileNameFromURL(NSString* url);
BOOL isFileExist(NSString* path);
void createDirectory(NSString* path);
BOOL isDirectoryExist(NSString* path);
void removePath(NSString* path);
NSString* MD5String(NSString* key);
-(void)removeIndicator;
@end
